
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreOrderInvoiceRequest struct {

	Uid string `json:"uid" form:"uid"`

	Category string `json:"category" form:"category"`

	OrderId string `json:"order_id" form:"order_id"`

	InvoiceId string `json:"invoice_id" form:"invoice_id"`

	HeaderType string `json:"header_type" form:"header_type"`

	Type string `json:"type" form:"type"`

	Name string `json:"name" form:"name"`

	DutyNumber string `json:"duty_number" form:"duty_number"`

	DrawerPhone string `json:"drawer_phone" form:"drawer_phone"`

	Email string `json:"email" form:"email"`

	Tell string `json:"tell" form:"tell"`

	Address string `json:"address" form:"address"`

	Bank string `json:"bank" form:"bank"`

	CardNumber string `json:"card_number" form:"card_number"`

	IsPay string `json:"is_pay" form:"is_pay"`

	IsRefund string `json:"is_refund" form:"is_refund"`

	IsInvoice string `json:"is_invoice" form:"is_invoice"`

	InvoiceNumber string `json:"invoice_number" form:"invoice_number"`

	Remark string `json:"remark" form:"remark"`

	InvoiceTime string `json:"invoice_time" form:"invoice_time"`

	AddTime string `json:"add_time" form:"add_time"`

	UniqueNum string `json:"unique_num" form:"unique_num"`

	InvoiceNum string `json:"invoice_num" form:"invoice_num"`

	InvoiceType string `json:"invoice_type" form:"invoice_type"`

	InvoiceSerialNumber string `json:"invoice_serial_number" form:"invoice_serial_number"`

	RedInvoiceNum string `json:"red_invoice_num" form:"red_invoice_num"`

	IsDel string `json:"is_del" form:"is_del"`

}

func (r *StoreOrderInvoiceRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreOrderInvoiceRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"uid": "required",

		"category": "required",

		"order_id": "required",

		"invoice_id": "required",

		"header_type": "required",

		"type": "required",

		"name": "required",

		"duty_number": "required",

		"drawer_phone": "required",

		"email": "required",

		"tell": "required",

		"address": "required",

		"bank": "required",

		"card_number": "required",

		"is_pay": "required",

		"is_refund": "required",

		"is_invoice": "required",

		"invoice_number": "required",

		"remark": "required",

		"invoice_time": "required",

		"add_time": "required",

		"unique_num": "required",

		"invoice_num": "required",

		"invoice_type": "required",

		"invoice_serial_number": "required",

		"red_invoice_num": "required",

		"is_del": "required",

	}
}

func (r *StoreOrderInvoiceRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreOrderInvoiceRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreOrderInvoiceRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
